/**
 * 
 */
package andersonb.managedbeans;

import java.io.Serializable;
import java.util.Calendar;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import andersonb.hbm2ddl.GenerateTablesFromEntities;

/**
 * Inicializador do projeto JPA.
 * 
 * @author Anderson Bernardo
 * @since 01/09/2012
 */
@ManagedBean(name = "jpaInitializerBean")
@SessionScoped
public class JPAInitializerBean implements Serializable {
	private static final long serialVersionUID = 2030573882306870998L;

	public void initJPA() {
		System.out.println("Initializing...");
		new GenerateTablesFromEntities().init();
	}

	public String time() {
		return Calendar.getInstance().toString();
	}

	public String testParam(String str) {
		return "Value is: " + str;
	}

}
